package ShiYan;

public class Example18 {
    public static void main(String[] args) {
        double i = 1,ret = 0,xiang = 1;
        while (i <= 100){
            xiang = xiang * i;
            ret += xiang;
            i++;
        }
        System.out.println("1!+2!+3!+…+100!的值为"+ret);
    }
}
